package com.example.threadSimple;


import java.util.Optional;

import lombok.Data;

/**
 * @Author: Ah Nan
 * @Description: 测试 Optional 类的链式方法
 * @Date: 16:24 2020/6/28
 */
@Data
public class UserModel {

    private String email;

    private String tel;

    private Address address;

    public UserModel() {

    }

    public UserModel(String email, String tel) {
        this.email = email;
        this.tel = tel;
    }

    public Optional<Address> getAddress() {
        return Optional.ofNullable(address);
    }
}
